Integrand size = 19, antiderivative size = 134 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^4} \, dx=-\frac {b^2 \cos (c+d x)}{d}-\frac {a^2 d \cos (c+d x)}{6 x^2}+2 a b d \cos (c) \operatorname {CosIntegral}(d x)-\frac {1}{6} a^2 d^3 \cos (c) \operatorname {CosIntegral}(d x)-\frac {a^2 \sin (c+d x)}{3 x^3}-\frac {2 a b \sin (c+d x)}{x}+\frac {a^2 d^2 \sin (c+d x)}{6 x}-2 a b d \sin (c) \text {Si}(d x)+\frac {1}{6} a^2 d^3 \sin (c) \text {Si}(d x) \]
2*a*b*d*Ci(d*x)*cos(c)-1/6*a^2*d^3*Ci(d*x)*cos(c)-b^2*cos(d*x+c)/d-1/6*a^2 *d*cos(d*x+c)/x^2-2*a*b*d*Si(d*x)*sin(c)+1/6*a^2*d^3*Si(d*x)*sin(c)-1/3*a^ 2*sin(d*x+c)/x^3-2*a*b*sin(d*x+c)/x+1/6*a^2*d^2*sin(d*x+c)/x
Time = 0.28 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.85 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^4} \, dx=\frac {1}{6} \left (-\frac {6 b^2 \cos (c+d x)}{d}-\frac {a^2 d \cos (c+d x)}{x^2}-a d \left (-12 b+a d^2\right ) \cos (c) \operatorname {CosIntegral}(d x)-\frac {2 a^2 \sin (c+d x)}{x^3}-\frac {12 a b \sin (c+d x)}{x}+\frac {a^2 d^2 \sin (c+d x)}{x}+a d \left (-12 b+a d^2\right ) \sin (c) \text {Si}(d x)\right ) \]
((-6*b^2*Cos[c + d*x])/d - (a^2*d*Cos[c + d*x])/x^2 - a*d*(-12*b + a*d^2)* Cos[c]*CosIntegral[d*x] - (2*a^2*Sin[c + d*x])/x^3 - (12*a*b*Sin[c + d*x]) /x + (a^2*d^2*Sin[c + d*x])/x + a*d*(-12*b + a*d^2)*Sin[c]*SinIntegral[d*x ])/6
Time = 0.42 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3820, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^4} \, dx\) |
\(\Big \downarrow \) 3820 |
\(\displaystyle \int \left (\frac {a^2 \sin (c+d x)}{x^4}+\frac {2 a b \sin (c+d x)}{x^2}+b^2 \sin (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {1}{6} a^2 d^3 \cos (c) \operatorname {CosIntegral}(d x)+\frac {1}{6} a^2 d^3 \sin (c) \text {Si}(d x)+\frac {a^2 d^2 \sin (c+d x)}{6 x}-\frac {a^2 \sin (c+d x)}{3 x^3}-\frac {a^2 d \cos (c+d x)}{6 x^2}+2 a b d \cos (c) \operatorname {CosIntegral}(d x)-2 a b d \sin (c) \text {Si}(d x)-\frac {2 a b \sin (c+d x)}{x}-\frac {b^2 \cos (c+d x)}{d}\) |
-((b^2*Cos[c + d*x])/d) - (a^2*d*Cos[c + d*x])/(6*x^2) + 2*a*b*d*Cos[c]*Co sIntegral[d*x] - (a^2*d^3*Cos[c]*CosIntegral[d*x])/6 - (a^2*Sin[c + d*x])/ (3*x^3) - (2*a*b*Sin[c + d*x])/x + (a^2*d^2*Sin[c + d*x])/(6*x) - 2*a*b*d* Sin[c]*SinIntegral[d*x] + (a^2*d^3*Sin[c]*SinIntegral[d*x])/6
3.1.55.3.1 Defintions of rubi rules used
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*Sin[(c_.) + (d_.)*(x_ )], x_Symbol] :> Int[ExpandIntegrand[Sin[c + d*x], (e*x)^m*(a + b*x^n)^p, x ], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
Time = 0.36 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.90
method | result | size |
derivativedivides | \(d^{3} \left (a^{2} \left (-\frac {\sin \left (d x +c \right )}{3 d^{3} x^{3}}-\frac {\cos \left (d x +c \right )}{6 d^{2} x^{2}}+\frac {\sin \left (d x +c \right )}{6 d x}+\frac {\operatorname {Si}\left (d x \right ) \sin \left (c \right )}{6}-\frac {\operatorname {Ci}\left (d x \right ) \cos \left (c \right )}{6}\right )+\frac {2 a b \left (-\frac {\sin \left (d x +c \right )}{d x}-\operatorname {Si}\left (d x \right ) \sin \left (c \right )+\operatorname {Ci}\left (d x \right ) \cos \left (c \right )\right )}{d^{2}}-\frac {b^{2} \cos \left (d x +c \right )}{d^{4}}\right )\) | \(120\) |
default | \(d^{3} \left (a^{2} \left (-\frac {\sin \left (d x +c \right )}{3 d^{3} x^{3}}-\frac {\cos \left (d x +c \right )}{6 d^{2} x^{2}}+\frac {\sin \left (d x +c \right )}{6 d x}+\frac {\operatorname {Si}\left (d x \right ) \sin \left (c \right )}{6}-\frac {\operatorname {Ci}\left (d x \right ) \cos \left (c \right )}{6}\right )+\frac {2 a b \left (-\frac {\sin \left (d x +c \right )}{d x}-\operatorname {Si}\left (d x \right ) \sin \left (c \right )+\operatorname {Ci}\left (d x \right ) \cos \left (c \right )\right )}{d^{2}}-\frac {b^{2} \cos \left (d x +c \right )}{d^{4}}\right )\) | \(120\) |
risch | \(\frac {\cos \left (c \right ) \operatorname {Ei}_{1}\left (i d x \right ) a^{2} d^{3}}{12}+\frac {\cos \left (c \right ) \operatorname {Ei}_{1}\left (-i d x \right ) a^{2} d^{3}}{12}-d \cos \left (c \right ) \operatorname {Ei}_{1}\left (i d x \right ) a b -d \cos \left (c \right ) \operatorname {Ei}_{1}\left (-i d x \right ) a b -\frac {i \sin \left (c \right ) \operatorname {Ei}_{1}\left (i d x \right ) a^{2} d^{3}}{12}+\frac {i \sin \left (c \right ) \operatorname {Ei}_{1}\left (-i d x \right ) a^{2} d^{3}}{12}+i d \sin \left (c \right ) \operatorname {Ei}_{1}\left (i d x \right ) a b -i d \sin \left (c \right ) \operatorname {Ei}_{1}\left (-i d x \right ) a b -\frac {\left (2 a^{2} d^{8} x^{4}+12 b^{2} x^{6} d^{6}\right ) \cos \left (d x +c \right )}{12 d^{7} x^{6}}+\frac {i \left (-2 i a^{2} d^{9} x^{5}+24 i a b \,d^{7} x^{5}+4 i a^{2} d^{7} x^{3}\right ) \sin \left (d x +c \right )}{12 d^{7} x^{6}}\) | \(218\) |
meijerg | \(\frac {b^{2} \sin \left (c \right ) \sin \left (d x \right )}{d}+\frac {b^{2} \sqrt {\pi }\, \cos \left (c \right ) \left (\frac {1}{\sqrt {\pi }}-\frac {\cos \left (d x \right )}{\sqrt {\pi }}\right )}{d}+\frac {d^{2} a b \sqrt {\pi }\, \sin \left (c \right ) \left (-\frac {4 d^{2} \cos \left (x \sqrt {d^{2}}\right )}{x \left (d^{2}\right )^{\frac {3}{2}} \sqrt {\pi }}-\frac {4 \,\operatorname {Si}\left (x \sqrt {d^{2}}\right )}{\sqrt {\pi }}\right )}{2 \sqrt {d^{2}}}+\frac {d a b \sqrt {\pi }\, \cos \left (c \right ) \left (\frac {4 \gamma -4+4 \ln \left (x \right )+4 \ln \left (d \right )}{\sqrt {\pi }}+\frac {4}{\sqrt {\pi }}-\frac {4 \gamma }{\sqrt {\pi }}-\frac {4 \ln \left (2\right )}{\sqrt {\pi }}-\frac {4 \ln \left (\frac {d x}{2}\right )}{\sqrt {\pi }}-\frac {4 \sin \left (d x \right )}{\sqrt {\pi }\, d x}+\frac {4 \,\operatorname {Ci}\left (d x \right )}{\sqrt {\pi }}\right )}{2}+\frac {a^{2} \sqrt {\pi }\, \sin \left (c \right ) d^{4} \left (-\frac {8 \left (-d^{2} x^{2}+2\right ) d^{2} \cos \left (x \sqrt {d^{2}}\right )}{3 x^{3} \left (d^{2}\right )^{\frac {5}{2}} \sqrt {\pi }}+\frac {8 \sin \left (x \sqrt {d^{2}}\right )}{3 d^{2} x^{2} \sqrt {\pi }}+\frac {8 \,\operatorname {Si}\left (x \sqrt {d^{2}}\right )}{3 \sqrt {\pi }}\right )}{16 \sqrt {d^{2}}}+\frac {a^{2} \sqrt {\pi }\, \cos \left (c \right ) d^{3} \left (-\frac {8}{\sqrt {\pi }\, x^{2} d^{2}}-\frac {4 \left (2 \gamma -\frac {11}{3}+2 \ln \left (x \right )+2 \ln \left (d \right )\right )}{3 \sqrt {\pi }}+\frac {-\frac {44 d^{2} x^{2}}{9}+8}{d^{2} x^{2} \sqrt {\pi }}+\frac {8 \gamma }{3 \sqrt {\pi }}+\frac {8 \ln \left (2\right )}{3 \sqrt {\pi }}+\frac {8 \ln \left (\frac {d x}{2}\right )}{3 \sqrt {\pi }}-\frac {8 \cos \left (d x \right )}{3 \sqrt {\pi }\, d^{2} x^{2}}-\frac {16 \left (-\frac {5 d^{2} x^{2}}{2}+5\right ) \sin \left (d x \right )}{15 \sqrt {\pi }\, d^{3} x^{3}}-\frac {8 \,\operatorname {Ci}\left (d x \right )}{3 \sqrt {\pi }}\right )}{16}\) | \(397\) |
d^3*(a^2*(-1/3*sin(d*x+c)/d^3/x^3-1/6*cos(d*x+c)/d^2/x^2+1/6*sin(d*x+c)/d/ x+1/6*Si(d*x)*sin(c)-1/6*Ci(d*x)*cos(c))+2/d^2*a*b*(-sin(d*x+c)/d/x-Si(d*x )*sin(c)+Ci(d*x)*cos(c))-1/d^4*b^2*cos(d*x+c))
Time = 0.29 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.87 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^4} \, dx=-\frac {{\left (a^{2} d^{4} - 12 \, a b d^{2}\right )} x^{3} \cos \left (c\right ) \operatorname {Ci}\left (d x\right ) - {\left (a^{2} d^{4} - 12 \, a b d^{2}\right )} x^{3} \sin \left (c\right ) \operatorname {Si}\left (d x\right ) + {\left (a^{2} d^{2} x + 6 \, b^{2} x^{3}\right )} \cos \left (d x + c\right ) + {\left (2 \, a^{2} d - {\left (a^{2} d^{3} - 12 \, a b d\right )} x^{2}\right )} \sin \left (d x + c\right )}{6 \, d x^{3}} \]
-1/6*((a^2*d^4 - 12*a*b*d^2)*x^3*cos(c)*cos_integral(d*x) - (a^2*d^4 - 12* a*b*d^2)*x^3*sin(c)*sin_integral(d*x) + (a^2*d^2*x + 6*b^2*x^3)*cos(d*x + c) + (2*a^2*d - (a^2*d^3 - 12*a*b*d)*x^2)*sin(d*x + c))/(d*x^3)
\[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^4} \, dx=\int \frac {\left (a + b x^{2}\right )^{2} \sin {\left (c + d x \right )}}{x^{4}}\, dx \]
Result contains complex when optimal does not.
Time = 1.49 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.04 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^4} \, dx=-\frac {{\left ({\left (a^{2} {\left (\Gamma \left (-3, i \, d x\right ) + \Gamma \left (-3, -i \, d x\right )\right )} \cos \left (c\right ) + a^{2} {\left (-i \, \Gamma \left (-3, i \, d x\right ) + i \, \Gamma \left (-3, -i \, d x\right )\right )} \sin \left (c\right )\right )} d^{5} - 12 \, {\left (a b {\left (\Gamma \left (-3, i \, d x\right ) + \Gamma \left (-3, -i \, d x\right )\right )} \cos \left (c\right ) + a b {\left (-i \, \Gamma \left (-3, i \, d x\right ) + i \, \Gamma \left (-3, -i \, d x\right )\right )} \sin \left (c\right )\right )} d^{3}\right )} x^{3} + 8 \, a b \sin \left (d x + c\right ) + 2 \, {\left (b^{2} d x^{3} + 2 \, a b d x\right )} \cos \left (d x + c\right )}{2 \, d^{2} x^{3}} \]
-1/2*(((a^2*(gamma(-3, I*d*x) + gamma(-3, -I*d*x))*cos(c) + a^2*(-I*gamma( -3, I*d*x) + I*gamma(-3, -I*d*x))*sin(c))*d^5 - 12*(a*b*(gamma(-3, I*d*x) + gamma(-3, -I*d*x))*cos(c) + a*b*(-I*gamma(-3, I*d*x) + I*gamma(-3, -I*d* x))*sin(c))*d^3)*x^3 + 8*a*b*sin(d*x + c) + 2*(b^2*d*x^3 + 2*a*b*d*x)*cos( d*x + c))/(d^2*x^3)
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.30 (sec) , antiderivative size = 1032, normalized size of antiderivative = 7.70 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^4} \, dx=\text {Too large to display} \]
1/12*(a^2*d^4*x^3*real_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 + a^2*d^4*x^3*real_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*a^2*d^4*x^3*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c) - 2* a^2*d^4*x^3*imag_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c) + 4*a^ 2*d^4*x^3*sin_integral(d*x)*tan(1/2*d*x)^2*tan(1/2*c) - a^2*d^4*x^3*real_p art(cos_integral(d*x))*tan(1/2*d*x)^2 - a^2*d^4*x^3*real_part(cos_integral (-d*x))*tan(1/2*d*x)^2 + a^2*d^4*x^3*real_part(cos_integral(d*x))*tan(1/2* c)^2 + a^2*d^4*x^3*real_part(cos_integral(-d*x))*tan(1/2*c)^2 - 12*a*b*d^2 *x^3*real_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 - 12*a*b*d^2 *x^3*real_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*a^2*d^4 *x^3*imag_part(cos_integral(d*x))*tan(1/2*c) - 2*a^2*d^4*x^3*imag_part(cos _integral(-d*x))*tan(1/2*c) + 4*a^2*d^4*x^3*sin_integral(d*x)*tan(1/2*c) - 24*a*b*d^2*x^3*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c) + 2 4*a*b*d^2*x^3*imag_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c) - 48 *a*b*d^2*x^3*sin_integral(d*x)*tan(1/2*d*x)^2*tan(1/2*c) - a^2*d^4*x^3*rea l_part(cos_integral(d*x)) - a^2*d^4*x^3*real_part(cos_integral(-d*x)) + 12 *a*b*d^2*x^3*real_part(cos_integral(d*x))*tan(1/2*d*x)^2 + 12*a*b*d^2*x^3* real_part(cos_integral(-d*x))*tan(1/2*d*x)^2 - 4*a^2*d^3*x^2*tan(1/2*d*x)^ 2*tan(1/2*c) - 12*a*b*d^2*x^3*real_part(cos_integral(d*x))*tan(1/2*c)^2 - 12*a*b*d^2*x^3*real_part(cos_integral(-d*x))*tan(1/2*c)^2 - 4*a^2*d^3*x...
Timed out. \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^4} \, dx=\int \frac {\sin \left (c+d\,x\right )\,{\left (b\,x^2+a\right )}^2}{x^4} \,d x \]